import createAxios from '/@/utils/axios'

// 员工管理相关API
export function getEmployeeList(params: object = {}) {
    return createAxios({
        url: 'admin/yxerp.employee/index',
        method: 'get',
        params: params
    })
}

export function getEmployeesByDepartment(params: { department_id: number }) {
    return createAxios({
        url: 'admin/yxerp.employee/getEmployeesByDepartment',
        method: 'get',
        params: params
    })
}

export function addEmployee(data: object) {
    return createAxios({
        url: 'admin/yxerp.employee/add',
        method: 'post',
        data: data
    })
}

export function updateEmployee(data: { row: object, ids: number }) {
    return createAxios({
        url: 'admin/yxerp.employee/edit',
        method: 'post',
        data: data
    })
}

export function delEmployee(data: { ids: number }) {
    return createAxios({
        url: 'admin/yxerp.employee/del',
        method: 'post',
        data: data
    })
} 